package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.service.HaiNingService;

import java.util.List;

import rx.Observable;
import rx.Subscriber;

public class FixAdviceMethods extends BaseMethods {

    private static FixAdviceMethods m_ins = null;

    public static FixAdviceMethods getInstance() {
        if (m_ins == null) {
            synchronized (FixAdviceMethods.class) {
                if (m_ins == null) {
                    m_ins = new FixAdviceMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Other/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void fixAdvice(Subscriber<List> subscriber,
                        String name ,  String mobile
            ,  String village_name,  String acreage ,  String decorate_budget ,  String decorate_style,  String room_num , String office_num  ,String toilet_num ) {
        Observable observable = initService().fixAdvice(System.currentTimeMillis()+"",
                "067f118ceb7cb741e607a2e50d1cd894",name,mobile,village_name,acreage,decorate_budget,decorate_style,room_num,office_num,toilet_num
        );
        toOtherSubscribe(observable, subscriber);
    }
}
